Bug 557212 - Problem with which window gains focus and is visible
authorTor Lillqvist <tml@novell.com>
Mon, 3 Nov 2008 22:38:29 +0000 (22:38 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 3 Nov 2008 22:38:29 +0000 (22:38 +0000)
2008-11-04  Tor Lillqvist  <tml@novell.com>

Bug 557212 - Problem with which window gains focus and is visible

* gdk/win32/gdkevents-win32.c (ensure_stacking_on_activate_app):
Only do the restacking for the active window of the
application. Seems to fix the problem.

(gdk_event_translate): Only call ensure_stacking_on_activate_app()
when the application is being activated, not deactivated.

svn path=/trunk/; revision=21756

ChangeLog
gdk/win32/gdkevents-win32.c

index a19254014c500e6eeead5636d1e8c5f66ecb328c..3afeace6918caa208c9fc15df9641128d975bded 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-11-04  Tor Lillqvist  <tml@novell.com>
+
+       Bug 557212 - Problem with which window gains focus and is visible
+
+       * gdk/win32/gdkevents-win32.c (ensure_stacking_on_activate_app):
+       Only do the restacking for the active window of the
+       application. Seems to fix the problem.
+
+       (gdk_event_translate): Only call ensure_stacking_on_activate_app()
+       when the application is being activated, not deactivated.
+
 2008-11-03  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtk.symbols:
index 686e0fe527a4fe26a97d0b88a940912881f28215..07e68b45970ca788c489adc152f257facfc260f3 100644 (file)
@@ -2214,12 +2214,12 @@ ensure_stacking_on_activate_app (MSG       *msg,
     }
 
   if (IsWindowVisible (msg->hwnd) &&
-      gdk_win32_handle_table_lookup (GetActiveWindow ()))
+      msg->hwnd == GetActiveWindow ())
     {
-      /* This window is not a transient-type window and this or some
-       * other window in this app is the active window. Make sure this
-       * window is as visible as possible, just below the lowest
-       * transient-type window of this app.
+      /* This window is not a transient-type window and it is the
+       * activated window. Make sure this window is as visible as
+       * possible, just below the lowest transient-type window of this
+       * app.
        */
       HWND rover;
 
@@ -3680,7 +3680,7 @@ gdk_event_translate (MSG  *msg,
                                 msg->wParam ? "YES" : "NO",
                                 (gint64) msg->lParam));
 
-      if (GDK_WINDOW_IS_MAPPED (window))
+      if (msg->wParam && GDK_WINDOW_IS_MAPPED (window))
        ensure_stacking_on_activate_app (msg, window);
       break;